<template>
  <!-- <el-header>Header</el-header> -->
  <el-container>
    <el-aside :width= "isCollapse ? '64px':'200px'" >
      <YYmenu @changeMenuEvent="changeMenuWidth"/>
    </el-aside>
    <el-main>
      <router-view></router-view>
    </el-main>
  </el-container>

</template>

<script>

import { YYmenu,Table2 } from "@/components/home";
export default {
  data(){
    return {
      isCollapse:false,
    }
  },
  components: {
    YYmenu,
  },
  methods:{
    changeMenuWidth(data) {
      console.log('通知父控件该处理侧边栏宽度了');
      this.isCollapse = data;
    }
  }
};
</script>

<style>
.el-container {
  height: 100%;
}
.el-aside {
  background-color: #545c64;
}
.el-main {
  background-color: #EAEDF2;
}
</style>
